home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / currentdir.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  57 lines

  1.      NOLIST
  2. CurrentDir  MACRO              ; 14 Sept 88
  3. *------------------------------; Start of CurrentDir macro.
  4.                                ; Set up D1 for the _LVOCurrentDir function.
  5.      NOLIST
  6.      IFEQ ReEntrant-1
  7.      LIST
  8.      MOVE.L \1(A5),D1
  9.      NOLIST
  10.      ENDC
  11.      IFNE ReEntrant-1
  12.      LIST
  13.      MOVE.L \1,D1
  14.      NOLIST
  15.      ENDC
  16.      LIST
  17.      CallLib CurrentDir,dos    ; Call CurrentDir.
  18.      NOLIST
  19.      IFEQ NARG-2               ; If <OldDirLockName> is specified,
  20.      LIST
  21.                                ; Save the old dir lock under the specified
  22.                                ;  name.
  23.      NOLIST
  24.      IFEQ ReEntrant-1
  25.      LIST
  26.      DefDS \2,1
  27.      MOVE.L D0,\2(A5)
  28.      NOLIST
  29.      ENDC
  30.      IFNE ReEntrant-1
  31.      LIST
  32.      MOVE.L D0,\2
  33.      DS_BSS \2,1,.L
  34.      NOLIST
  35.      ENDC
  36.      ENDC
  37.      IFEQ NARG-1
  38.                                ; If <OldDirLockName> is not specified, then
  39.      IFEQ ReEntrant-1
  40.      LIST
  41.      DefDS OldDirLock,1
  42.      MOVE.L D0,OldDirLock(A5)  ; Save the old directory lock at "OldDirLock".
  43.      NOLIST
  44.      ENDC
  45.      IFNE ReEntrant-1
  46.      LIST
  47.      MOVE.L D0,OldDirLock      ; Save the old directory lock at "OldDirLock".
  48.      DS_BSS OldDirLock,1,.L
  49.      NOLIST
  50.      ENDC
  51.      ENDC
  52.      LIST
  53.      TST.L D0                  ; Make the zero flag indicate if old was root.
  54. *------------------------------; End of CurrentDir macro.
  55.      ENDM
  56.      LIST
  57.